package com.erqi.config;

import com.erqi.pojo.Message;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.boot.ApplicationArguments;
import org.springframework.boot.ApplicationRunner;
import org.springframework.stereotype.Component;

@Component
@Slf4j
public class AfterServiceStarted implements ApplicationRunner {

    @Autowired
    Message message;
    /**
     * 会在服务启动完成后立即执行
     */
    @Override
    public void run(ApplicationArguments args) throws Exception {
        message.ini();
        log.info("登录信息数据初始化--");
    }
}